import requestTypes from '../common';

// 培训计划列表
const getPlanList = <T = any>(parameter: object = {}) => {
	return requestTypes<T>({
		url: '/SMS/TrainPlan/QueryPageList',
		method: 'get',
		params: parameter,
	});
};
// 新增培训计划
const postPlan = <T = any>(parameter: object = {}) => {
	return requestTypes<T>({
		url: '/SMS/TrainPlan/Add',
		method: 'post',
		data: parameter,
		multiPartFormData: true,
	});
};
// 修改培训计划
const postChangePlan = <T = any>(parameter: object = {}) => {
	return requestTypes<T>({
		url: '/SMS/TrainPlan/Update',
		method: 'post',
		data: parameter,
		multiPartFormData: true,
	});
};
// 删除培训计划
const postDeletePlan = <T = any>(parameter: object = {}) => {
	return requestTypes<T>({
		url: '/SMS/TrainPlan/Delete',
		method: 'post',
		data: parameter,
	});
};

//删除培训人员
const postDeleteTrainEmp = <T = any>(parameter: object = {}) => {
	return requestTypes<T>({
		url: '/SMS/TrainPlan/DeleteTrainEmp',
		method: 'post',
		data: parameter,
	});
};

//新增培训人员
const postAddTrainEmp = <T = any>(parameter: object = {}) => {
	return requestTypes<T>({
		url: '/SMS/TrainPlan/AddTrainEmp',
		method: 'post',
		data: parameter,
	});
};

//提交培训人员分数
const postAddScore = <T = any>(parameter: object = {}) => {
	return requestTypes<T>({
		url: '/SMS/TrainPlan/UpdateScore',
		method: 'post',
		data: parameter,
	});
};
//提交培训计划列表
export { getPlanList, postPlan, postChangePlan, postDeletePlan, postDeleteTrainEmp, postAddTrainEmp, postAddScore };
